import jsonschema


class logEmp():
    @classmethod
    def login_emp_sch(self, data):
        schema = {
            "type": "object",
            "properties": {
                "desc": {"type": "string"},
                "req_data": {
                    "type": "object",
                    "properties": {
                        "mobile": {"type": "string", "pattern": "^1[3,4,5,7,8,9][0-9]{9}$"},
                        "password": {"type": "string"}
                    },
                    "required": ["mobile", "password"]
                },
                "stauts_code": {"const": 200, "type": "integer"},
                "success": {"type": "boolean"},
                "code": {"type": "integer"},
                "message": {"type": "string"}
            },
            "required": ["desc", "req_data", "stauts_code", "success", "code", "message"]
        }
        for i in range(len(data)):
            jsonschema.validate(schema=schema, instance=data[i])
